/**
 * Created by Administrator on 2016/5/11.
 */
$(function(){

    var oldHeight = 0;
    var oldWidth = 0;
    $(".screentmore").on('click', function () {
        var $this = $(this);
        var $content = $this.parents(".screen-content");
        if ($this.attr("class").indexOf("down")!=-1) {
            $content.css("height", oldHeight);
            $content.find(".screent-width").css("width", oldWidth);
            $this.addClass("up").removeClass("down");
            $content.find("span.icon.iconfont").addClass("up").removeClass("down");
        }
        else {
            oldHeight = $content.css("height");
            oldWidth = $content.find(".screent-width").css("width");

            $content.css("height", "auto");
            $content.find(".screent-width").css("width", "100%");
            $this.addClass("down").removeClass("up");
            $content.find("span.icon.iconfont").addClass("down").removeClass("up");
        }
    })
})